import { request } from '@/utils/request';

/**
 * @description 获取table列表
 */
export function getTableListApi(data?: API.SearchParams) {
  return request({
    url: '/manage/admin/caseAction/pageList',
    method: 'post',
    data,
  });
}

/**
 * @description 编辑案由
 */
//
export function updateTable(data: API.UpdateTableParams) {
  return request({
    url: '/manage/admin/caseAction/update',
    method: 'put',
    data,
  });
}

/**
 * @description 新增案由
 */
//
export function createTable(data: API.CreateTableParams) {
  return request({
    url: '/manage/admin/caseAction/save',
    method: 'post',
    data,
  });
}

/**
 * @description 删除机构
 */
//
export function deleteTableApi(id?: number) {
  return request({
    url: `/manage/admin/caseAction/delete/${id}`,
    method: 'delete',
  });
}
